@property --rotate {
  syntax: "<angle>";
  initial-value: 132deg;
  inherits: false;
}

.content-box {
  position: relative;
  border: 2px solid transparent;
  background: linear-gradient(rgb(26,26,26), rgb(26,26,26)) padding-box,
              linear-gradient(var(--rotate), #ff5d5d, #e33c3c 43%, #c20000) border-box;
  animation: spin 2.5s linear infinite 0.5s;
  animation-fill-mode: both;
}

.content-box::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(var(--rotate), #ff5d5d, #e33c3c 43%, #c20000);
  opacity: 0;
  animation: spin 2.5s linear infinite 0.5s, fadeInBorder 0.5s ease-out 0.5s forwards;
}

.content-box::after {
  content: "";
  position: absolute;
  top: -0.5rem;
  left: -0.5rem;
  right: -0.5rem;
  bottom: -0.5rem;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(var(--rotate), #ff5d5d, #e33c3c 43%, #c20000);
  filter: blur(8px);
  opacity: 0;
  animation: spin 1.5s linear infinite 0.5s, fadeInGlow 0.5s ease-out 0.5s forwards;
}

@keyframes spin {
  0% {
    --rotate: 0deg;
  }
  100% {
    --rotate: 360deg;
  }
}

@keyframes fadeInBorder {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes fadeInGlow {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 0.7;
  }
}
